<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div class="a b c"></div>

    <script>

        // className  字符串   不方便操作
        // classList  类名列表   add()   remove()  replace()

        var oDiv = document.querySelector('div');
        console.log(oDiv.className);   // 'a b c'

        console.log(oDiv.classList);    // ['a' , 'b' , 'c'  , ...]

    </script>
    
</body>
</html>